<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        echo print_r(PDO::getAvailableDrivers()) . "<br>";
        echo PDO::ATTR_DRIVER_NAME . "<br>";
        
        try {                        
            $bd = new PDO ("mysql:host=localhost;dbname=pdo;port=3306;unix_socket=/tmp/mysql.sock", "pdo", "pdo", array(PDO::ATTR_PERSISTENT => true));
            
            $q="CREATE TABLE login (
                    log_user VARCHAR(50) PRIMARY KEY,
                    log_senha VARCHAR(32),
                    log_tipo int,
                    
            )";
            
            $stmt = $bd->prepare($q);
            
            if(!$stmt->execute())
                print_r($stmt->errorInfo());
                        
        } catch (PDOException $e) {
            print "Erro: " . $e->getMessage() . "<br/>";
            die();
        }

        echo $bd->getAttribute(PDO::ATTR_DRIVER_NAME) . "<br>";
        $bd->exec("set names utf8");
        echo PDO::PARAM_INT . "<br>";
        echo PDO::PARAM_BOOL . "<br>";
        
        //encerra
        $bd = null;

        // put your code here
        ?>
    </body>
</html>